package com.ayz.gateway.center.domain.model;

import lombok.Data;

import java.io.Serializable;
import java.util.HashSet;

/**
 * @ClassName ApplicationData
 * @Description TODO: 微服务的详细信息
 * @Author 快乐的星球
 * @Date 2023/5/13 15:55
 * @Version 1.0
 **/
@Data
public class ApplicationData implements Serializable {
    /**
     * 应用程序的名称
     */
    private String applicationName;
    /**
     * 当前应用程序名称的副本地址信息
     */
    private HashSet<String> applicationAddressSet=new HashSet<>();
    /**
     * 网关组的名称
     */
    private String gatewayGroup;

    public ApplicationData(String applicationName, HashSet<String> applicationAddressSet) {
        this.applicationName = applicationName;
        this.applicationAddressSet = applicationAddressSet;
    }


    public ApplicationData(String applicationName, HashSet<String> applicationAddressSet, String gatewayGroup) {
        this.applicationName = applicationName;
        this.applicationAddressSet = applicationAddressSet;
        this.gatewayGroup = gatewayGroup;
    }

    public ApplicationData() {
    }

    public ApplicationData(String applicationName) {
        this.applicationName = applicationName;
    }

    public void addApplicationAddress(String address){
        this.applicationAddressSet.add(address);
    }
}
